<?php

/**
 * Represents a <HTML> Web Page
 */
class Z_Html_Page extends Z_Component {

    public function __construct() {
        parent::__construct("<!DOCTYPE html><html>","</html>");

        //Search for the related page to load
        $p = isset($_GET['p']) ? $_GET['p'] : Z_App::getConf()->page->main;

        //instance of Mobile_Page
	$theClass = split(":", $p);
	$theClass = $theClass[count($theClass)-1];
        

	//verify folders...
        $p = str_replace(":", "/", $p);
        require_once '../pages/' . $p . '.php';

	$instance = new $theClass;

	$this->add(new Z_Html_Head());
        $this->add(new Z_Html_Body($instance));
    }
   
}